package com.iisrun.controller;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class JspGoto {
	
	@RequestMapping("/jsp.htm")
	protected void jsp(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// ../jsp.htm?page=/globalconfig/organization_index.jsp
		StringBuilder page = new StringBuilder("WEB-INF/view/");
		String req_page = request.getParameter("page");
		page.append(req_page);// 转换跳转的url， 跳转的jsp页面
		request.getRequestDispatcher(page.toString()).forward(request, response);
	}
}